set more off

set seed 12262021

*******************************
********* ALLIANCES ***********
********************************
use "Alliance_RepData.dta", clear

***BASE MODELS

**Pooled

logit violate solschangeNA_3 dembothNA othldrtransNA_3 time timesquare timecube, robust cluster (atopidphase)
test solschangeNA_3=othldrtransNA_3

***CONTROL 1 MODELS

**Pooled

logit violate solschangeNA_3 dembothNA othldrtransNA_3 regtransNA abscincperch1_10 decthreat1_10 allyCW1 postCW time timesquare timecube, robust cluster (atopidphase)
test solschangeNA_3=othldrtransNA_3


*** CONTROL 2 MODELS

**Pooled

logit violate solschangeNA_3 dembothNA othldrtransNA_3 regtransNA abscincperch1_10 decthreat1_10 allyCW1 postCW mixedalliance nomicoop estmode milinst abscincperch2_10 incthreat2_10 solschangeNB_3 time timesquare timecube, robust cluster (atopidphase)
test solschangeNA_3=othldrtransNA_3


*******************************
********* UNGA *****************
********************************
use "UNGA_RepData.dta", clear
tsset ccode year

***BASE MODELS

**Pooled

xtreg logvotech solsch othldrtrans demboth, i(ccode) fe robust cluster(ccode)
test solsch=othldrtrans

*** CONTROL 1 MODEL

** Pooled

xtreg logvotech solsch othldrtrans demboth regtrans allyCW CWend abscincperch10 gdpdrop5 logrealGDPpcG, i(ccode) fe robust cluster(ccode)
test solsch=othldrtrans



*******************************
********* SANCTIONS ***********
*******************************
use "Sanctions_RepData.dta", clear

******** ALL CASES, W/ US

***BASE MODELS

**Pooled

logit sendercap2 ssolsch4 snonsolsch4 sdemmboth monthnum monthnum2 monthnum3, robust cluster(caseid) 
test ssolsch4=snonsolsch4 

*** CONTROL 1

**Pooled

logit sendercap2 ssolsch4 snonsolsch4 sdemmboth abscincperch10A gdpdrop5A sregtrans allyCWA postCW monthnum monthnum2 monthnum3, robust cluster(caseid) 
test ssolsch4=snonsolsch4 

*** CONTROL 2

**Pooled

logit sendercap2 ssolsch4 snonsolsch4 sdemmboth abscincperch10A gdpdrop5A sregtrans allyCWA postCW abscincperch10B tregtrans tsolsch4 gdpratio2008 costs high ifthen monthnum monthnum2 monthnum3, robust cluster(caseid) 
test ssolsch4=snonsolsch4 



******** ALL CASES, NO US

***BASE MODELS

**Pooled

logit sendercap2 ssolsch4 snonsolsch4 sdemmboth monthnum monthnum2 monthnum3 if US==0, robust cluster(caseid) 
test ssolsch4=snonsolsch4 


*** CONTROL 1

**Pooled

logit sendercap2 ssolsch4 snonsolsch4 sdemmboth abscincperch10A gdpdrop5A sregtrans allyCWA postCW monthnum monthnum2 monthnum3 if US==0, robust cluster(caseid) 
test ssolsch4=snonsolsch4 

*** CONTROL 2

**Pooled

logit sendercap2 ssolsch4 snonsolsch4 sdemmboth abscincperch10A gdpdrop5A sregtrans allyCWA postCW abscincperch10B tregtrans tsolsch4 gdpratio2008 costs high ifthen monthnum monthnum2 monthnum3 if US==0, robust cluster(caseid) 
test ssolsch4=snonsolsch4 


*******************************
********* TRADE  **************
*******************************
use "Trade_RepData.dta", clear
tsset ddyad year

*****RESTRICTED SAMPLE

***BASIC

**Pooled

xtreg MRdv_rest L.solschdumA_3 L.othldrtransdumA_3 L.dembothA,fe cluster(ddyad) robust
test L.solschdumA_3 = L.othldrtransdumA_3

***CONTROL 1

**Pooled

xtreg MRdv_rest L.solschdumA_3 L.othldrtransdumA_3 L.dembothA L.regtransA L.allyCW1 L.CWend L.gdpdrop5 L.conflicta L.armconflict,fe cluster(ddyad) robust
test L.solschdumA_3 = L.othldrtransdumA_3

***CONTROL 2

**Pooled

xtreg MRdv_rest L.solschdumA_3 L.othldrtransdumA_3 L.dembothA L.regtransA L.allyCW1 L.CWend L.gdpdrop5 L.conflicta L.armconflict L.gattwto L.pta L.solschdumB_3 L.regtransB L.allyCW2 L.conflictb L.gdpln_a L.gdpln_b,fe cluster(ddyad) robust
test L.solschdumA_3 = L.othldrtransdumA_3
